# -*- coding: utf-8 -*-
# @Author : HaleShi
# @Time : 2023-06-28
# @File : 13_frida-rpc_脚本.py


import frida

rdev = frida.get_remote_device()
session = rdev.attach("大姨妈")

scr = """
    rpc.exports = {   
        encrypt:function(j2,str,j3){
         var res;

         Java.perform(function () {
            var Crypt = Java.use("com.yoloho.libcore.util.Crypt");  
            res = Crypt.encrypt_data(j2,str,j3);
         });

         return res;
    }
}
"""
script = session.create_script(scr)
script.load()

sign = script.exports.encrypt(0, "3e56104c8b41fc4db7a72972e298fa711bf0135euser/login18378353331k9MChHWxECDGJ2SaKi04RA==", 85)
print(sign)